/**
 * Selling Partner API for Notifications
 * The Selling Partner API for Notifications lets you subscribe to notifications that are relevant to a selling partner's business. Using this API you can create a destination to receive notifications, subscribe to notifications, delete notification subscriptions, and more.  For more information, refer to the [Notifications Use Case Guide](https://developer-docs.amazon.com/sp-api/docs/notifications-api-v1-use-case-guide).
 *
 * The version of the OpenAPI document: v1
 *
 *
 * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
 * https://openapi-generator.tech
 * Do not edit the class manually.
 *
 */

import { ApiClient } from '../ApiClient.js'

/**
 * The EventBridgeResourceSpecification model module.
 * @module notifications_v1/model/EventBridgeResourceSpecification
 * @version v1
 */
export class EventBridgeResourceSpecification {
  /**
   * Constructs a new <code>EventBridgeResourceSpecification</code>.
   * The information required to create an Amazon EventBridge destination.
   * @alias module:notifications_v1/model/EventBridgeResourceSpecification
   * @class
   * @param region {String} The AWS region in which you will be receiving the notifications.
   * @param accountId {String} The identifier for the AWS account that is responsible for charges related to receiving notifications.
   */
  constructor (region, accountId) {
    this.region = region
    this.accountId = accountId
  }

  /**
   * Constructs a <code>EventBridgeResourceSpecification</code> from a plain JavaScript object, optionally creating a new instance.
   * Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
   * @param {Object} data The plain JavaScript object bearing properties of interest.
   * @param {EventBridgeResourceSpecification} obj Optional instance to populate.
   * @return {EventBridgeResourceSpecification} The populated <code>EventBridgeResourceSpecification</code> instance.
   */
  static constructFromObject (data, obj) {
    if (data) {
      switch (typeof data) {
        case 'string':
          obj = String(data)
          break
        case 'number':
          obj = Number(data)
          break
        case 'boolean':
          obj = Boolean(data)
          break
      }
      obj = obj || new EventBridgeResourceSpecification()
      if (data.hasOwnProperty('region')) { obj.region = ApiClient.convertToType(data.region, 'String') }
      if (data.hasOwnProperty('accountId')) { obj.accountId = ApiClient.convertToType(data.accountId, 'String') }
    }
    return obj
  }
}

/**
 * The AWS region in which you will be receiving the notifications.
 * @member {String} region
 * @type {String}
 */
EventBridgeResourceSpecification.prototype.region = undefined

/**
 * The identifier for the AWS account that is responsible for charges related to receiving notifications.
 * @member {String} accountId
 * @type {String}
 */
EventBridgeResourceSpecification.prototype.accountId = undefined
